<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        table,td{
            border: 1px solid;
           
        }
        table{
            border-collapse: collapse;
            width: 200px;
            height: 100px;
        }
    </style>
</head>
<body>
    <script>
        function f_table(row,col){
            var t = '<table>';
            for(var i=0; i<row;i++){
                t = t + '<tr>';
                    for(var j=0;j<col;j++){
                        t= t + '<td></td>';
                    }
                t = t + '</tr>';    
            }
            t = t + '</table>';
            document.write(t);
        }
        var rows = Number(prompt('请输入行'));
        var cols = Number(prompt('请输入列'));
        f_table(rows,cols);
    </script>
</body>
</html>